package xyz.yq56.easytool.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

/**
 * @author yi qiang
 * @date 2021/9/17 0:23
 */
@ConfigurationProperties(prefix = "easy.tool")
@Data
public class EasyToolProperties {

    private Jwt jwt;

    @Data
    public static class Jwt {

        /**
         * 过期时间
         * <br> 默认1小时
         */
        long accessExpiry = 60 * 60 * 1000L;

        /**
         * fresh token过期时间
         * <br> 默认半年
         */
        long refreshExpiry = 180 * 24 * 60 * 60 * 1000L;

        /**
         * token前缀
         */
        String prefix = "Bearer";

        /**
         * token header名称
         */
        String header = "Authorization";

        /**
         * 访问密匙
         */
        String accessKey = "123@456#879$";

        /**
         * 刷新密匙
         */
        String refreshKey = "123@456#879$";

    }

}
